Israel Ors' HuffmanAlgorithm Documentation

HuffmanAlgorithm.Extract Method (Stream, String, Char[])

Build a frequency table and Huffman tree and extract the archive to a new file.

public bool Extract(
   Stream Data,
   string OutputFile,
   char[] Password
);

Parameters

Data
The data streem to shrink
OutputFile
Path to to save the extracted data.
Password
A Key to open the archive with, to mark as "passward less" assign null instead.

Return Value

flag that indicates if extraction went well or not: true = successful, false = wrong password error occured (the WrongPassword event will take place).

Remarks

The given stream must be readable, seekable and it's length must exceed zero. The given stream must be archived stream of the right type.

Exceptions

Exception Type Condition
Exception On attempt to extract data that wasn't coded with the HuffmanAlgorithm class, Or on attempt to extract a password protected stream\file with the wrong password. (If the WrongPassword event is been handeled by the user the 2nd exception is'nt relevant).

See Also

HuffmanAlgorithm Class | JadBenAutho.Tools Namespace | HuffmanAlgorithm.Extract Overload List